﻿using GameView.Comment;
using GameView.Models;
using GameView.Services.Dtos.ConsumProduct;

namespace GameView.Services
{
    public class ConsumProductService
    {
        public async Task<ApiResponse<PagedList<ConsumProductEntity>>> GetPageAsync(ConProQueryDto queryDto)
        {
            var res = await $"{APIHelper.ConPro}/page".PostAsync<PagedList<ConsumProductEntity>, ConProQueryDto>(queryDto);
            return res;
        }

        public async Task<ApiResponse<List<ConProStatisticsDto>>> StatisticsProCon(ConProQueryDto queryDto)
        {
            var res = await $"{APIHelper.ConPro}/statistics-pro-con".PostAsync<List<ConProStatisticsDto>, ConProQueryDto>(queryDto);
            return res;
        }
    }
}